package com.yh.homestay.controller;

import com.yh.homestay.aop.SystemLog;
import com.yh.homestay.common.HomeStayResult;
import com.yh.homestay.common.SysLogRustlt;
import com.yh.homestay.service.LogModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 日志管理
 */
@Controller
public class LogController {
    @Autowired
    private LogModelService logModelService;

    @RequestMapping(value = "/log/list")
    @ResponseBody
    @SystemLog(methods="日志展示", module = "日志管理")
    public HomeStayResult findAllLogs(Integer page, Integer limit, String start, String end, String logAccessAccount) {

        return logModelService.selecteAllLogs(page,limit,start,end,logAccessAccount);
    }
    @RequestMapping(value = "/log/more/{num}")
    @ResponseBody
      @SystemLog(methods="日志详情", module = "日志管理")
    public SysLogRustlt findLogByLogId(@PathVariable Integer num) {

        return logModelService.selecteLogByLogId(num);
    }



}
